//
//  PeopleChatBottomView.m
//  TQY
//
//  Created by 甘世清 on 2024/12/27.
//

#import "PeopleChatBottomView.h"

@implementation PeopleChatBottomView

- (void)SQ_UIViewForSelfView{
    self.backgroundColor = UIColor.whiteColor;
    UIView * bgView = [[UIView alloc]init];
    bgView.backgroundColor = SQColor(@"#E8DFFF");
    bgView.layer.cornerRadius = 12;
    [self addSubview:bgView];
    [bgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self).insets(UIEdgeInsetsMake(10, 12, 10, 12));
    }];
    UIImageView * imageView = [[UIImageView alloc]init];
    imageView.image = SQGetImage(@"wchat");
    imageView.contentMode = UIViewContentModeScaleAspectFit;
    [bgView addSubview:imageView];
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(bgView);
            make.size.mas_equalTo(24);
            make.left.equalTo(bgView).offset(10);
    }];
    UILabel * ct= [[UILabel alloc]init];
    ct.text = SQNSLocalString(@"微信号:");
    ct.font = FONT_MEDIUM(11);
    ct.textColor = SQColor333333;
    [bgView addSubview:ct];
    [ct mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(bgView);
        make.left.equalTo(imageView.mas_right).offset(4);
    }];
    [bgView addSubview:self.chatLabel];
    [self.chatLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(ct.mas_right);
            make.centerY.equalTo(bgView);
    }];
    [bgView addSubview:self.vipBtn];
    [self.vipBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(bgView.mas_right).offset(-10);
            make.centerY.equalTo(bgView);
        make.width.mas_equalTo(64);
        make.height.mas_equalTo(28);
    }];
   
}
- (UILabel *)chatLabel{
    if (!_chatLabel) {
        _chatLabel = [[UILabel alloc]init];
        _chatLabel.font = FONT_MEDIUM(11);
        _chatLabel.textColor = SQColor333333;
    }
    return _chatLabel;
}
- (SQCustomButton *)vipBtn{
    if (!_vipBtn) {
        _vipBtn = [[SQCustomButton alloc]initType:SQCustomButtonTopImageType imageSize:CGSizeMake(0, 0) midmargin:0];
        _vipBtn.text = SQNSLocalString(@"立即解锁");
        _vipBtn.backgroundColor = SQColor(@"#8760FF");
        _vipBtn.layer.cornerRadius = 14;
        _vipBtn.layer.masksToBounds = YES;
        _vipBtn.textColor = UIColor.whiteColor;
        _vipBtn.font = FONT_MEDIUM(11);
    }
    return _vipBtn;
}
@end
